package com.dog.basics.api.controller.mtkj;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dog.basics.bean.vo.api.mtkj.ApiGoodsTypeVo;
import com.dog.basics.common.constant.SwaggerConstants;
import com.dog.basics.common.util.PageParam;
import com.dog.basics.common.util.R;
import com.dog.basics.security.annotation.Inner;
import com.dog.basics.service.mtkj.IMtGoodsTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;


/**
 * <p>
 * 商品类型表 前端控制器
 * </p>
 *
 * @author wph
 * @since 2020-11-09
 */
@Api(value = "商品类型",tags = SwaggerConstants.API_ALL)
@RestController
@RequestMapping("/sc/mtgoods-type")
@AllArgsConstructor
public class MtGoodsTypeController {
    private final IMtGoodsTypeService goodsTypeService;

    /**
     * 获取商品类型列表
     * @returns
     * @author hangdy
     * @date: 2020/11/12 14:33
     */
    @Inner
    @GetMapping("/findAll")
    @ApiOperation(value = "获取商品类型列表", tags = SwaggerConstants.API_GOODS_TYPE)
    public R<IPage<ApiGoodsTypeVo>> findGoodTypes(PageParam page){
        return R.ok(goodsTypeService.findGoodTypes(page));
    }
}
